<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        *{
            padding: 0px;
            margin:0px;
        }
        .d1{
              width:500px;
              height: 500px;
              border:1px solid red;
              margin-left: 200px;
          }
        .d2{
            width:300px;
            height: 300px;
            border:1px solid green;
            margin-left:100px;
        }
        .d3{
            width:100px;
            height: 100px;
            border:1px solid blue;
            position: absolute;
            top:20px;
            left:40px;
        }


    </style>
</head>
<body>
    <div class="d1">
        <div class="d2">
            <div class="d3"></div>
        </div>
    </div>
</body>
</html>